<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

<script type="text/javascript">
    require(['backend/user/identity_percent'], function (IdentityPercent) {
        IdentityPercent.init();
    });
</script>

    <div class="panel-heading">
        <h3 class="panel-title">{:__('Basic_info')}</h3>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}" data-rule="required">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Direct_reward')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-direct_reward" class="form-control" name="row[direct_reward]" type="number" value="{$row.direct_reward}" data-rule="required">
                <span class="input-group-addon">%</span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Direct_reward_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-direct_reward_count" class="form-control" name="row[direct_reward_count]" type="number" value="{$row.direct_reward_count}" data-rule="required">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Indirect_reward')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-indirect_reward" class="form-control" name="row[indirect_reward]" type="number" value="{$row.indirect_reward}" data-rule="required">
                <span class="input-group-addon">%</span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Indirect_reward_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-indirect_reward_count" class="form-control" name="row[indirect_reward_count]" type="number" value="{$row.indirect_reward_count}" data-rule="required">
                <span class="input-group-addon">%</span>
            </div>
        </div>
    </div>

    
    <div class="panel-heading">
        <h3 class="panel-title">{:__('Upgrade_conditions')}</h3>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Purchase_amount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-purchase_amount" class="form-control" name="row[purchase_amount]" type="number" value="{$row.purchase_amount}" data-rule="required">
        </div>
    </div>

    
    <div class="panel-heading">
        <h3 class="panel-title">{:__('Identity_card')}</h3>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Icon')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-icon" class="form-control" size="50" name="row[icon]" type="text" value="{$row.icon|htmlentities}" data-rule="required">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-icon" class="btn btn-danger faupload" data-input-id="c-icon" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-icon"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-icon" class="btn btn-primary fachoose" data-input-id="c-icon" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-icon"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-icon"></ul>
        </div>
    </div>
    
    <div class="panel-heading">
        <h3 class="panel-title">{:__('Identity_intro')}</h3>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-description" class="form-control" size="50" name="row[description]" type="text" value="{$row.description|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-description" class="btn btn-danger faupload" data-input-id="c-description" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-description"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-description" class="btn btn-primary fachoose" data-input-id="c-description" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-description"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-description"></ul>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh}" data-rule="required">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['1'=>__('Normal'), '0'=>__('Hidden')], $row['status'])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>